package fr.cie.blog.domainservice;


import java.util.List;

import fr.cie.blog.beans.Article;
import fr.cie.blog.beans.Category;
import fr.cie.blog.modeldao.hib.CategoryDaoImplHib;

/**
 * @author AetM
 * 
 */
public class ServiceCategoryDao implements IServiceCategory {
	/**
	 * servCategoryImpl.
	 */
	private final IServiceCategory servCategoryImpl = new CategoryDaoImplHib();

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#save(java.lang.Object)
	 */
	@Override
	public final int save(final Category pObject) {
		return servCategoryImpl.save(pObject);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#delete(java.lang.Object)
	 */
	@Override
	public final int delete(final Category pObject) {
		return servCategoryImpl.delete(pObject);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#findAll()
	 */
	@Override
	public final List<Category> findAll() {
		return servCategoryImpl.findAll();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * fr.cie.blog.domainservice.IServiceCategory#findByArticle(fr.cie.blog.
	 * beans.Article)
	 */
	@Override
	public final Category findByArticle(final Article pArticle) {
		return servCategoryImpl.findByArticle(pArticle);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#findById(int)
	 */
	@Override
	public final Category findById(final long pIdentifier) {
		return servCategoryImpl.findById(pIdentifier);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#update(java.lang.Object)
	 */
	@Override
	public final int update(final Category pObject) {
		return servCategoryImpl.update(pObject);
	}
}